package com.rxb.blog.mapper;

import com.rxb.blog.entity.UserEntity;
import com.rxb.blog.vo.UserVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Author：rxb
 * Date：2020-01-16 16:51
 * Description：<描述>
 */
@Repository
public interface UserMapper {
   UserEntity selectById(@Param("id") int id);

   UserEntity selectByUsername(@Param("userVo") UserVo userVo);

   UserEntity selectByEmail(@Param("userVo") UserVo userVo);

   void insertUser(@Param("userVo") UserVo userVo);

   UserEntity selectByUsernameAndEmail(@Param("userVo") UserVo userVo);

   List<UserEntity> getUsers(@Param("startNum") int startNum, @Param("pageSize") int pageSize);

   int getUsersTotalNum();

   void updateUser(@Param("userVo") UserVo userVo);

   void updateUserById(@Param("userVo") UserVo userVo);

   void deleteUser(@Param("userVo") UserVo userVo);

   void deleteUsers(@Param("ids") List<Integer> ids);
}
